from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

url = 'https://imooc.com'
driver = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver')
driver.get(url)

input_element = driver.find_element(By.CLASS_NAME, 'imv2-search2')


sleep(2)
# clear
input_element.clear()
input_element.send_keys("Selenium")

sleep(3)

input_element.clear()
input_element.send_keys("Python 爬虫")

sleep(3)

# input_element.clear()
# send_keys
input_element.send_keys("小布_老师")

sleep(10)
driver.quit()
